<?php header('Content-Type: text/html; charset=utf-8'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

<!--
PAGE DOCUMENTATION:
==================
This page is used in an Ajax call to get the content of the record dialog 
(in an iFrame due to FB limitations) after the user chose a name for his meaage.

Parameters that can be sent to this page:
----------------------------------------
recipient - user FB ID of the recipient of a message (of doesn't exist - 0).
newFileName - the recorded file name (no extentions).
message_name - the user's input of a name for the message.
-->




<?php

$message_name = htmlspecialchars(urldecode($_REQUEST['message_name']),null,'UTF-8');
$recipient = $_REQUEST['recipient'];
$newFileName = $_REQUEST['newFileName'];

// activate 

$nameURL = htmlentities(urlencode($message_name),null,'UTF-8');
echo "
<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
  codebase=\"http://download.macromedia.com/\"  
  WIDTH=\"250\" HEIGHT=\"300\" id=\"Player\">
  <PARAM NAME=movie VALUE=\"testClient.swf?newFileName=$newFileName&recipient=$recipient&message_name=".$nameURL."\"> 
  <PARAM NAME=quality VALUE=high>
  <PARAM NAME=bgcolor VALUE=#FFFFFF> 
<PARAM NAME=allowScriptAccess VALUE = \"always\">
<param name=\"allowScriptAccess\" value=\"always\">
  <EMBED src=\"testClient.swf?newFileName=$newFileName&recipient=$recipient&message_name=".$nameURL."\" 
    quality=high bgcolor=#FFFFFF WIDTH=\"250\" HEIGHT=\"250\" NAME=\"flaMovie1\" allowScriptAccess = \"always\"
    TYPE=\"application/x-shockwave-flash\" 
    PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\">
  </EMBED>
</OBJECT>
";

?>

</body>
</html>